<?php

class Facebook extends Controller {

	public $user;
	public $auth_token;

	function Facebook()
	{
		parent::Controller();
		$this->load->helper("url");
		$data['api'] = "8106b4b5c48bb735a5cb9d888813d1df";
		$data['secret'] = "47442ca1e5a074e531ce1f699532aec5";
		$this->load->library("facebook",$data);
		$this->facebook->require_frame();
		$this->facebook->require_login();
	}
	
	function index()
	{
		$this->user = $this->facebook->get_loggedin_user();
		$data['user'] = "<fb:name firstnameonly='true' uid='".$this->user."' useyou='false' />";
		$this->load->view("index",$data);
	}
	
	function auth_token($t)
	{
		$this->auth_token = $t;
		redirect("");
	}
	
}
?>